<%@ include file="../common/base.jsp" %>
<%@ page contentType= "text/html;charset=gb2312" %>

<table width="100%">
	<tr>
		<td align="left" width="60%">
			<strong><fmt:message key="label.product.title1" /></strong>
			<shiro:hasPermission name="process:edit">
			<c:if test="${empty step00 && empty View}">
			&nbsp;&nbsp;
			<a href="./sedit.o?productId=<c:out value='${product.id}'/>&step=step00">
				<fmt:message key="Edit" />
			</a>
			</c:if>
			</shiro:hasPermission>
		</td>
		<c:if test="${not empty product.lot}">
		<td align="right" width="10%">
			<strong>Lot:<c:out value="${product.lot}" /></strong>
		</td>
		</c:if>
		<td align="right">
			<strong><fmt:message key="label.product.title2" /></strong>
		</td>
	</tr>
</table>
<c:if test="${not empty step00}">
<input type="hidden" name="id" value="<c:out value="${product.id}" />">
<input type="hidden" name="className" value="com.octopus.optiworks.model.Product">
<input type="hidden" name="step" value="step00">
<input type="hidden" name="lot" value="<c:out value="${product.lot}" />">
<input type="hidden" name="template" value="<c:out value="${product.template.id}" />">
<input type="hidden" name="stepSpecId" value="<c:out value="${product.stepSpecId}" />">
<input type="hidden" name="createDate" value="<fmt:formatDate  value="${product.createDate}" pattern="yyyy-MM-dd HH:mm"/>">
<table rules="all" width="100%" bgcolor="#F0F0FF">
	<tr>
		<td>
			<fmt:message key="label.product.wono" />
		</td>
		<td >
			<input type="text" name="wono" value="<c:out value="${product.wono}" />">
		</td>
		<td width="15%">
			<fmt:message key="label.product.finalSn" />
		</td>
		<td >
			<input type="hidden" name="finalSn" value="<c:out value="${product.finalSn}" />">
			<c:if test="${not empty product.finalSn}">
			<img src="<%=request.getContextPath() %>/barcode?code=*<c:out value="${product.finalSn}" />*&barType=CODE39&checkCharacter=n&checkCharacterInText=n" />
			</c:if>
		</td>
		<td width="15%">
			<fmt:message key="label.product.pn" />
		</td>
		<td >
			<input type="text" name="pn" value="<c:out value="${product.pn}" />">
		</td>
	</tr>
	<tr>
		<td >
			<fmt:message key="label.product.ituch" />
		</td>
		<td >
			<form:select path="product.ituch" items="${ituchs}" itemValue="name" itemLabel="name"/>
		</td>
		<td>
			<fmt:message key="label.product.internalSn" />
		</td>
		<td >
			<input type="text" name="internalSn" value="<c:out value="${product.internalSn}" />">
		</td>
		<td >
			<fmt:message key="label.product.itunm" />
		</td>
		<td >
			<form:select path="product.itunm" items="${itunms}" itemValue="name" itemLabel="name"/>
		</td>
	</tr>
	<tr>
		<td >
			<fmt:message key="label.product.frequency" />
		</td>
		<td >
			<c:if test="${product.frequency=='200'}">
				<input type="radio" name="frequency" value="200" checked>200
			</c:if>
			<c:if test="${product.frequency!='200'}">
				<input type="radio" name="frequency" value="200" >200
			</c:if>
			<c:if test="${product.frequency=='100'}">
				<input type="radio" name="frequency" value="100" checked>100
			</c:if>
			<c:if test="${product.frequency!='100'}">
				<input type="radio" name="frequency" value="100" >100
			</c:if>
			<c:if test="${product.frequency=='50'}">
				<input type="radio" name="frequency" value="50" checked>50
			</c:if>
			<c:if test="${product.frequency!='50'}">
				<input type="radio" name="frequency" value="50" >50
			</c:if>
			<c:if test="${product.frequency!='200' && product.frequency!='100' && product.frequency!='50'}">
				<input type="radio" name="frequency" value="_other_" checked>
				<input type="text" name="frequency_other" size="1" value="<c:out value="${product.frequency}" />">
			</c:if>
			<c:if test="${product.frequency=='200' || product.frequency=='100' || product.frequency=='50'}">
				<input type="radio" name="frequency" value="_other_" >
				<input type="text" name="frequency_other" size="1" value="" />
			</c:if>
		</td>
		<td>
			<fmt:message key="label.product.channelPb2" />
		</td>
		<td >
			<c:if test="${product.channelPb2=='0.25'}">
				<input type="radio" name="channelPb2" value="0.25" checked>+/-0.25
			</c:if>
			<c:if test="${product.channelPb2!='0.25'}">
				<input type="radio" name="channelPb2" value="0.25" >+/-0.25
			</c:if>
			<c:if test="${product.channelPb2=='0.11'}">
				<input type="radio" name="channelPb2" value="0.11" checked>+/-0.11
			</c:if>
			<c:if test="${product.channelPb2!='0.11'}">
				<input type="radio" name="channelPb2" value="0.11" >+/-0.11
			</c:if>
			<c:if test="${product.channelPb2!='0.25' && product.channelPb2!='0.11'}">
				<input type="radio" name="channelPb2" value="_other_" checked>+/-
				<input type="text" name="channelPb2_other" size="1" value="<c:out value="${product.channelPb2}" />">
			</c:if>
			<c:if test="${product.channelPb2=='0.25' || product.channelPb2=='0.11'}">
				<input type="radio" name="channelPb2" value="_other_" >+/-
				<input type="text" name="channelPb2_other" size="1" value="" />
			</c:if>
		</td>
		<td>
	    	<c:if test="${not empty product.stepSpec}">
	    		<fmt:message key="Spec" />
	    	</c:if>
		</td>
		<td>
	    	<c:if test="${not empty product.stepSpec}">
	    		<c:out value="${product.stepSpec.name}" />
	    	</c:if>
		</td>
	</tr>
</table>
</c:if>

<c:if test="${empty step00}">
<table rules="all" width="100%">
	<tr>
		<td width="16%">
			<fmt:message key="label.product.wono" />
		</td>
		<td >
			<c:out value="${product.wono}" />
		</td>
		<td width="15%">
			<fmt:message key="label.product.finalSn" />
		</td>
		<td >
			<c:if test="${not empty product.finalSn}">
			<img src="<%=request.getContextPath() %>/barcode?code=*<c:out value="${product.finalSn}" />*&barType=CODE39&checkCharacter=n&checkCharacterInText=n" />
			</c:if>
		</td>
		<td width="15%">
			<fmt:message key="label.product.pn" />
		</td>
		<td >
			<c:if test="${not empty product.pn}">
			<img src="<%=request.getContextPath() %>/barcode?code=<c:out value="${product.pn}" />&barType=CODE39&checkCharacter=n&checkCharacterInText=n" />
			</c:if>
		</td>
	</tr>
	<tr>
		<td >
			<fmt:message key="label.product.ituch" />
		</td>
		<td >
			<c:out value="${product.ituch}" />
		</td>
		<td>
			<fmt:message key="label.product.internalSn" />
		</td>
		<td >
			<input type="hidden" name="internalSn" value="<c:out value="${product.internalSn}" />">
			<c:if test="${not empty product.internalSn}">
			<img src="<%=request.getContextPath() %>/barcode?code=<c:out value="${product.internalSn}" />&barType=CODE39&checkCharacter=n&checkCharacterInText=n" />
			</c:if>
		</td>
		<td >
			<fmt:message key="label.product.itunm" />
		</td>
		<td >
			<c:out value="${product.itunm}" />
		</td>
	</tr>
	<tr>
		<td >
			<fmt:message key="label.product.frequency" />
		</td>
		<td >
			<c:out value="${product.frequency}" />
		</td>
		<td>
			<fmt:message key="label.product.channelPb2" />
		</td>
		<td >
			+/-<c:out value="${product.channelPb2}" />
		</td>
		<td>
	    	<c:if test="${not empty product.stepSpec}">
	    		<fmt:message key="Spec" />
	    	</c:if>
		</td>
		<td>
	    	<c:if test="${not empty product.stepSpec}">
	    		<c:out value="${product.stepSpec.name}" />
	    	</c:if>
		</td>
	</tr>
</table>
</c:if>



